home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / comm / misc / avmNfax1_33.lha / AVMSuite / GNU / efax.man < prev    next >
Text File  |  1994-05-26  |  28KB  |  595 lines

  1. efax - send/receive faxes using Class 1 or 2 fax modems
  2.  
  3. [ ] [ | ]
  4.  
  5.  
  6. Where _o_p_t_i_o_n_s are:
  7.  
  8. use the fax modem  connected  to  device  _d_e_v.   The  default  is
  9. /dev/fax.
  10.  
  11.  
  12. use option _o_p_t to accommodate a non-standard fax modem  protocol.
  13. See  the  MODEM REQUIREMENTS section below for more details.  The
  14. _o_p_tions are:
  15.  
  16.     1 Use Class 1 fax modem  commands.   The  modem  must  suport
  17. Class 1 commands.  The default is to use Class 2 commands.
  18.  
  19.     a use software adaptive answer method.  If the first  attempt
  20. to answer the call does not result in a data connection within 20
  21. seconds the phone is hung up temporarily and  answered  again  in
  22. fax mode (see "Accepting both fax and data calls" below).
  23.  
  24.     e ignore errors in modem initialization commands.  If  errors
  25. are already being ignored, pay attention to them again.
  26.  
  27.     r reverse bit order during data reception.  Most  modems  re-
  28. quire this option.
  29.  
  30.     x send XON (DC1) instead of DC2 to start data reception.  Ap-
  31. plies to Class 2 only.
  32.  
  33.     z delay an additional 100 milliseconds before each modem ini-
  34. tialization  or  reset command.  The initial delay is 100 ms. For
  35. example, -ozzz produces a 400 ms delay.
  36.  
  37.  
  38. send the command AT_s_t_r to the modem to initialize  it.   Multiple
  39. -i may options be used.
  40.  
  41. send the command AT_s_t_r to the modem to reset it when done.   Mul-
  42. tiple -z may options be used.
  43.  
  44. set the local capabilities to _c_a_p_s.  See the section on capabili-
  45. ties  below  for  the format and meaning of _c_a_p_s.  The default is
  46. 1,3,0,2,0,0,0,0. For Class 2 operation this  option  must  appear
  47. after the modem initialization (-i) option that enables fax mode.
  48.  
  49. set the local identification string to _i_d.  _i_d should be the  lo-
  50. cal telephone number in international format (for example "+1 800
  51. 555 1212").  This option must appear after the modem  initializa-
  52. tion (-i) option that enables fax mode.
  53.  
  54. select types of messages to be printed.  Each  _l_o_w_e_r-_c_a_s_e  letter
  55. in _s_t_r_n_g enables one type of message:
  56.  
  57. e - errors
  58. w - warnings
  59. i - session progress information
  60. n - capability negotiation information
  61. c - modem (AT) commands and responses
  62. h - HDLC frame data (Class 1 only)
  63. m - modem output
  64. a - program arguments
  65. r - reception error details
  66.  
  67.  
  68. The default is "ewin".
  69.  
  70. use UUCP-style lock file _l_k_f to  lock  the  modem  device  before
  71. opening  it.   If  the  device  is  locked,  efax checks every 15
  72. seconds until it is free.  Up to 16 -x options  may  be  used  if
  73. there are several names for the same device.  A `#' prefix on the
  74. file name creates an HDB-style (text) lock file.
  75.  
  76. remove lock file(s) after initializing the  modem.   This  allows
  77. outgoing  calls  to proceed.  When efax detects modem activity it
  78. will attempt to re-lock the device.  If the modem is  now  locked
  79. by  another  program  efax will exit and return 1 (``busy'').  If
  80. efax is run again (e.g. by init) it will then wait until the line
  81. becomes free.
  82.  
  83. don't issue an answer (ATA) command before starting to receive  a
  84. fax.  Use this option when the modem is set to auto-answer (using
  85. S0=_n) or if another program has already answered the call.
  86.  
  87. if a CONNECT (or DATA) response indicates a data call, the  shell
  88. /bin/sh  is  exec(2)'ed  with  _c_m_d  as  its  command.   _c_m_d  is a
  89. printf(3) format that may contain up to 6 %d  escapes  which  are
  90. replaced  by the baud rate following the most recent CONNECT mes-
  91. sage. _c_m_d typically exec's getty(8).
  92.  
  93. ask for page retransmission if more than _n errors  detected,  De-
  94. fault is 10.
  95.  
  96.  
  97. answer phone and receive a fax.  Each fax page  is  stored  in  a
  98. separate  file.   The  file  name  is  created  using  _p_a_t  as  a
  99. strftime(3) format string.  A page number of the form .001, .002,
  100.  ... is appended to the file name.  If _p_a_t is blank (""),  a  de-
  101. fault  string of "%m%d%H%M%S" is used.  If a file already exists,
  102. efax terminates with an error message.
  103.  
  104. dial telephone number _n_u_m and send the fax image  files  _f_i_l_e....
  105. The  telephone  number  _n_u_m is a string that may contain any dial
  106. modifiers that the modem supports, for example, a  T  prefix  for
  107. tone dialing or commas for delays.
  108.  
  109.  
  110. Each page is stored in a separate file.  The images are coded ac-
  111. cording  to the ITU-T (CCITT) Group 3 fax standard, T.4.  The EX-
  112. AMPLES section below shows how Ghostscript and the PBMPlus utili-
  113. ties can be used to create and print these files.
  114.  
  115.  
  116. The operating system must provide short response times  to  avoid
  117. protocol  timeouts.   When  using Class 1 modems the program must
  118. respond to certain events (DCS frame or end of  data)  within  55
  119. milliseconds.   For  Class 2 modems the delay should not exceed 1
  120. or 2 seconds.
  121.  
  122. The operating  system  must  also  provide  sufficient  low-level
  123. buffering  to allow uninterrupted transfer of data from the modem
  124. to a disk file at the selected baud  rate,  typically  9600  bps.
  125. Since  the  fax protocol does not provide end-to-end flow control
  126. the effectiveness of flow control while receiving is  limited  by
  127. the  size of the modem's buffer. This can be less than 100 bytes.
  128. Efax does not use flow control during reception.
  129.  
  130.  
  131. "Group" describes the protocol used to send faxes over the  tele-
  132. phone network.  Efax suports the universal Group 3 standard.  The
  133. "Class" is the protocol used between a computer and a fax  modem.
  134. Efax supports Class 1 and 2 (but not 2.0) fax modems.
  135.  
  136. Most modems (including those based on Rockwell  or  Sierra  chip-
  137. sets)  reverse  the bit order (MSB to LSB) on receive.  This will
  138. cause errors when trying to display or print the received  files.
  139. The  -or  option  should  be specified when receiving faxes using
  140. these modems.
  141.  
  142. While all fax modems support XON/XOFF flow control, most have un-
  143. reliable  hardware  (RTS/CTS)  flow  control  in fax mode.  Since
  144. XON/XOFF flow control adds very little overhead in fax mode, efax
  145. does not support hardware flow control.
  146.  
  147. While some modems have serial buffers of  about  1k  bytes,  many
  148. inexpensive  modems  have  buffers of about one hundred bytes and
  149. are thus more likely to suffer overruns when receiving data.
  150.  
  151. Some modems may need a delay between commands of  more  than  the
  152. default  value  used by efax (100 milliseconds).  If the delay is
  153. too short, commands may not echo properly, may time out,  or  may
  154. give  inconsistent responses.  Use one or more -oz options to in-
  155. crease the delay between modem initialization commands.
  156.  
  157. Class 1 modems should not be used on systems that cannot  guaran-
  158. tee  that  the program will respond to incoming data in less than
  159. 55 milliseconds.  Longer delays may cause  the  fax  protocol  to
  160. fail  in  certain  places (between DCS and TCF or between RTC and
  161. MPS).
  162.  
  163. By default efax sends DC2 to start the data flow from  the  modem
  164. when receiving faxes from Class 2 modems.  A few older modems re-
  165. quire XON instead.  Use of DC2 would cause the modem to  give  an
  166. error  message  and/or  the  program to time out.  The -ox option
  167. should be used in this case.
  168.  
  169. A few older Class 2 modems don't send DC2 or  XON  to  start  the
  170. data  flow  to  the  modem  when  sending faxes.  After waiting 2
  171. seconds efax will print a warning and start sending anyways.
  172.  
  173. The following modems have been reported to work with  efax:  AT&T
  174. DataPort,  ATT/Paradyne,  Boca  modem, Cardinal Digital Fax Modem
  175. (14400) (Class 1), Crosslink 9614FH faxmodem, FuryCard DNE  5005,
  176. Intel  14.4  fax  modem,  MultiTech 1432MU, Practical Peripherals
  177. PM14400FXMT, Supra V32bis, Supra Faxmodem 144LC (Class 1),  Tele-
  178. bit Worldblazer, Twincom 144/DFi, Vobis Fax-Modem (BZT-approved),
  179. Zoom VFX14.4V (Class 1 and 2), ZyXEL U-1496E[+].
  180.  
  181.  
  182.  
  183. Modem initialization commands are supplied as command-line  argu-
  184. ments.
  185.  
  186. The modem must be set up to  issue  verbose(text)  result  codes.
  187. The following command does this:
  188.  
  189. respond to commands with verbose result codes
  190.  
  191. The following commands may be useful in some cases:
  192.  
  193. don't wait for dial tone before dialing.  This  may  be  used  to
  194. send  a  fax  when the call has already been dialed manually.  In
  195. this case use an empty string ("") as the first argument  to  the
  196. -t command.  Use X4 (usual default) to enable all result codes.
  197.  
  198. leave the monitor speaker turned on for the duration of the  call
  199. (use M0 to leave it off).
  200.  
  201. turn monitor speaker volume to minimum (use L3 for maximum).
  202.  
  203. returns the modem to command mode when DTR is dropped.  The  pro-
  204. gram drops DTR at the start and end of the call if it can't get a
  205. response to a reset (ATZ) command.  &D3 resets the modem when DTR
  206. is dropped.
  207.  
  208. wait up to two minutes (120 seconds) for carrier.   This  may  be
  209. useful  if  the  answering fax machine takes a long time to start
  210. the handshaking operation (e.g. a combined fax/answering  machine
  211. with a long announcement).
  212.  
  213. The following initialization command be used with Class 1 modems:
  214.  
  215. enables Class 1 fax modem commands.
  216.  
  217. The following  initialization  commands  be  used  with  Class  2
  218. modems:
  219.  
  220. enables Class 2 fax modem commands.
  221.  
  222. enable Class 2 fax reception.
  223.  
  224.  
  225. The capabilities of the local hardware and software are set using
  226. a string of 8 digits separated by commas:
  227.  
  228.  
  229. where:
  230.  
  231. 0 for 98 lines per inch
  232. 1 for 196 lpi
  233.  
  234. 0 for 2400 bps
  235. 1 for 4800
  236. 2 for 7200
  237. 3 for 9600
  238. 4 for 12000 (V.17)
  239. 5 for 14400 (V.17)
  240.  
  241. 0 for 8.5
  242. 1 for 10
  243. 2 for 12
  244.  
  245. 0 for 11
  246. 1 for 14
  247. 2 for unlimited page length
  248.  
  249. 0 for 1-D coding
  250. 1 for 2-D coding (not supported)
  251.  
  252. 0 for no error correction
  253.  
  254. 0 for no binary file transfer
  255.  
  256. 0 for zero delay per line
  257. 1 for 5 ms per line
  258. 3 for 10 ms per line
  259. 5 for 20 ms per line
  260. 7 for 40 ms per line
  261.  
  262. It is important that the proper capability string be specified.
  263.  
  264. When _r_e_c_e_i_v_i_n_g a fax the _v_r, _w_d, _l_n and _d_f fields of the capabil-
  265. ity  string should be set to the maximum values that your display
  266. software supports.
  267.  
  268. When _s_e_n_d_i_n_g a fax the _v_r, _w_d, _l_n and _d_f fields of the capability
  269. string  should  correspond  to the format of the image files.  If
  270. necessary, efax will convert  a  file  in  high  resolution  mode
  271. (_v_r=1)  to low resolution (_v_r=0) by sending alternate scan lines.
  272. However, if the receiving machine does not  support  any  of  the
  273. other format values then the fax files must be created again in a
  274. compatible format and another call made.  Most fax  machines  can
  275. receive _v_r=0 or 1 and _l_n up to 2.  Few machines support values of
  276. _w_d or _d_f other than 0.
  277.  
  278.  
  279.  
  280. A session log is written to the standard error stream.  This  log
  281. gives  status  and error messages from the program as selected by
  282. the -v option. A time stamp showing the time (or just minutes and
  283. seconds)  is printed after each message if more than 1 second has
  284. elapsed since the last time stamp.
  285.  
  286.  
  287. The program returns an error code as follows:
  288.  
  289. 0 The fax was successfully sent or received.
  290.  
  291. 1 The dialed number was busy or the modem device was in use.  Try
  292. again later.
  293.  
  294. 2 Something failed (e.g. file not found or disk full). Don't  re-
  295. try.  Check the session log for more details.
  296.  
  297. 3 Modem protocol error.  The program did not receive the expected
  298. response  from  the  modem.  The modem may not have been properly
  299. initialized, the correct -o options were not used, or a  bug  re-
  300. port may be in order.  Check the session log for more details.
  301.  
  302. 4 The modem is not responding.  Operator attention  is  required.
  303. Check  that  the  modem is turned on and connected to the correct
  304. port.
  305.  
  306. 5 The program was terminated by a signal.
  307.  
  308.  
  309.  
  310. Ghostscript's and drivers can be used to generate  fax  files  in
  311. Group  3 (T.4) format from postscript files if the 32-byte header
  312. is removed.  For example, the command:
  313.  
  314. gs -q -sDEVICE=dfaxhigh -dNOPAUSE \
  315.         -sOutputFile=letter.%03d letter.ps </dev/null
  316.  
  317. will convert the Postscript file into high-resolution  (_v_r=1)  G3
  318. fax  image files letter.001, letter.002, ...  The header can then
  319. be removed with the command:
  320.  
  321. dd if=_i_n_f_i_l_e of=_o_u_t_f_i_l_e _b_s=_3_2 _s_k_i_p=_1
  322.  
  323.  
  324. _T_h_e _P_o_r_t_a_b_l_e _B_i_t _M_a_p (_p_b_m) _s_u_i_t_e _c_a_n  _a_l_s_o  _b_e  _u_s_e_d  _t_o  _c_o_n_v_e_r_t
  325. _b_e_t_w_e_e_n _G_r_o_u_p _3 _a_n_d _m_a_n_y _o_t_h_e_r _i_m_a_g_e _f_o_r_m_a_t_s.  _F_o_r _e_x_a_m_p_l_e, _a _r_e_-
  326. _c_e_i_v_e_d _i_m_a_g_e _f_i_l_e, reply.001, _m_a_y _b_e _p_r_i_n_t_e_d _o_n  _a_n  _H_P  _L_a_s_e_r_j_e_t
  327. (_a_t _a_p_p_r_o_x_i_m_a_t_e_l_y _2/_3 _s_i_z_e) _b_y _u_s_i_n_g _t_h_e _c_o_m_m_a_n_d:
  328.  
  329. _g_3_t_o_p_b_m _r_e_p_l_y._0_0_1 | _p_b_m_t_o_l_j -_r_e_s_o_l_u_t_i_o_n _3_0_0 | _l_p_r
  330.  
  331.  
  332. The following command will dial the number  222-2222  using  tone
  333. dialing  and  send  a  two-page fax from the files letter.001 and
  334. letter.002 using the  Class  1  fax  modem  connected  to  device
  335. /dev/fax.   The  sending  modem  will  attempt to negotiate high-
  336. resolution (_v_r=1, 196 lpi).
  337.  
  338. efax -i "+FCLASS=1" -o1 -c1 \
  339.      -tT222-2222 letter.001 letter.002
  340.  
  341. _I_f _t_h_e _f_i_l_e_s _w_e_r_e _g_e_n_e_r_a_t_e_d _a_t _h_i_g_h _r_e_s_o_l_u_t_i_o_n (_1_9_6 _l_p_i) _a_n_d  _t_h_e
  342. _r_e_c_e_i_v_i_n_g  _m_o_d_e_m _d_o_e_s _n_o_t _s_u_p_p_o_r_t _i_t, _e_v_e_r_y _s_e_c_o_n_d _s_c_a_n _l_i_n_e _w_i_l_l
  343. _b_e _s_k_i_p_p_e_d _i_n _o_r_d_e_r _t_o _r_e_d_u_c_e _t_h_e _r_e_s_o_l_u_t_i_o_n.
  344.  
  345.  
  346. _Y_o_u _c_a_n _u_s_e _e_f_a_x _t_o _a_n_s_w_e_r _t_h_e _p_h_o_n_e _i_m_m_e_d_i_a_t_e_l_y  _a_n_d  _s_t_a_r_t  _f_a_x
  347. _r_e_c_e_p_t_i_o_n.  _U_s_e _t_h_i_s _m_o_d_e _i_f _y_o_u _n_e_e_d _t_o _a_n_s_w_e_r _c_a_l_l_s _m_a_n_u_a_l_l_y _t_o
  348. _s_e_e _i_f _t_h_e_y _a_r_e _f_a_x _o_r _v_o_i_c_e.
  349.  
  350. _F_o_r _e_x_a_m_p_l_e, _t_h_e _f_o_l_l_o_w_i_n_g _c_o_m_m_a_n_d _w_i_l_l  _m_a_k_e  _t_h_e  _C_l_a_s_s  _2  _f_a_x
  351. _m_o_d_e_m  _o_n  _d_e_v_i_c_e  /dev/ttyS1 _a_n_s_w_e_r _t_h_e _p_h_o_n_e _a_n_d _a_t_t_e_m_p_t _t_o _r_e_-
  352. _c_e_i_v_e _a _f_a_x.  _T_h_e _r_e_c_e_i_v_e_d _f_a_x _w_i_l_l _b_e _s_t_o_r_e_d _i_n  _t_h_e  _f_i_l_e_s  re-
  353. ply.001, reply.002, _a_n_d _s_o _o_n.  _T_h_e _m_o_d_e_m _w_i_l_l _i_d_e_n_t_i_f_y _i_t_s_e_l_f _a_s
  354. (_8_0_0) _5_5_5-_1_2_1_2 _a_n_d  _r_e_c_e_i_v_e  _f_a_x_e_s  _a_t  _h_i_g_h  _o_r  _l_o_w  _r_e_s_o_l_u_t_i_o_n
  355. (_v_r=_1),   _a_t  _u_p  _t_o  _9_6_0_0  _b_p_s  (_b_r=_3),  _f_o_r  _l_e_t_t_e_r-_s_i_z_e  _p_a_p_e_r
  356. (_w_d,_l_n=_0).   _T_h_e  tee  _c_o_m_m_a_n_d  _c_a_u_s_e_s  _t_h_e  _s_e_s_s_i_o_n  _l_o_g  _t_o  _b_e
  357. _d_i_s_p_l_a_y_e_d _a_s _w_e_l_l _a_s _b_e_i_n_g _s_a_v_e_d _i_n _t_h_e _f_i_l_e reply.log.
  358.  
  359. _e_f_a_x -_d /_d_e_v/_t_t_y_S_1 -_i "+_F_C_L_A_S_S=_2;+_F_C_R=_1" \
  360.    -_l "(_8_0_0) _5_5_5 _1_2_1_2" -_c _1,_3,_0,_0,_0,_0,_0,_0 \
  361.    -_r _r_e_p_l_y _2>&_1 | _t_e_e _r_e_p_l_y._l_o_g
  362.  
  363.  
  364. The -w option makes efax wait for characters to become  available
  365. from  the modem (indicating an incoming call) before starting fax
  366. reception.  Use the -w option and a -iS0=_n option to  answer  the
  367. phone  after  _n  rings.   The  example  below will make the modem
  368. answer incoming calls in fax mode on the fourth ring and save the
  369. received  faxes  using files names corresponding to the reception
  370. date and time.
  371.  
  372. efax -d /dev/ttyb -or -i"+FCLASS=2;+FCR=1" \
  373.    -iS0=4 -w -r "" 2>&1 >> fax.in.log
  374.  
  375.  
  376. _T_h_e _m_o_d_e_m _d_e_v_i_c_e _c_a_n _b_e _s_h_a_r_e_d _b_y _p_r_o_g_r_a_m_s _t_h_a_t _u_s_e _t_h_e _U_U_C_P _d_e_v_-
  377. _i_c_e _l_o_c_k_i_n_g _p_r_o_t_o_c_o_l (_k_e_r_m_i_t, _u_u_c_i_c_o, _e_f_a_x, _c_u, _e_t_c.).
  378.  
  379. _e_f_a_x _w_i_l_l _l_o_c_k _t_h_e _m_o_d_e_m _d_e_v_i_c_e _b_e_f_o_r_e _o_p_e_n_i_n_g _i_t _i_f _o_n_e _o_r  _m_o_r_e
  380. _U_U_C_P  _l_o_c_k  _f_i_l_e  _n_a_m_e_s _a_r_e _g_i_v_e_n _w_i_t_h -x _o_p_t_i_o_n_s.  _T_h_e _l_o_c_k _f_i_l_e
  381. _n_a_m_e_s _a_r_e _t_y_p_i_c_a_l_l_y /usr/spool/uucp/LCK.._d_e_v  _w_h_e_r_e  _d_e_v  _i_s  _t_h_e
  382. _n_a_m_e  _o_f  _t_h_e  _d_e_v_i_c_e  _f_i_l_e  _i_n  _t_h_e /_d_e_v _d_i_r_e_c_t_o_r_y _t_h_a_t _i_s _t_o _b_e
  383. _l_o_c_k_e_d.
  384.  
  385. _I_f _t_h_e -s (_s_h_a_r_e) _o_p_t_i_o_n _i_s _u_s_e_d, _t_h_e _l_o_c_k _f_i_l_e _i_s _r_e_m_o_v_e_d  _w_h_i_l_e
  386. _w_a_i_t_i_n_g  _f_o_r  _i_n_c_o_m_i_n_g  _c_a_l_l_s  _s_o _o_t_h_e_r _p_r_o_g_r_a_m_s _c_a_n _u_s_e _t_h_e _s_a_m_e
  387. _d_e_v_i_c_e.
  388.  
  389. _I_f _e_f_a_x _d_e_t_e_c_t_s _a_n_o_t_h_e_r _p_r_o_g_r_a_m _u_s_i_n_g _t_h_e _m_o_d_e_m _w_h_i_l_e _i_t _i_s _w_a_i_t_-
  390. _i_n_g _t_o _r_e_c_e_i_v_e _a _f_a_x, _e_f_a_x _e_x_i_t_s _w_i_t_h _a _t_e_r_m_i_n_a_t_i_o_n _c_o_d_e _o_f _1.  _A
  391. _s_u_b_s_e_q_u_e_n_t _e_f_a_x _p_r_o_c_e_s_s _u_s_i_n_g _t_h_i_s _d_e_v_i_c_e  _w_i_l_l  _w_a_i_t  _u_n_t_i_l  _t_h_e
  392. _o_t_h_e_r  _p_r_o_g_r_a_m  _i_s  _f_i_n_i_s_h_e_d _b_e_f_o_r_e _r_e-_i_n_i_t_i_a_l_i_z_i_n_g _t_h_e _m_o_d_e_m _a_n_d
  393. _s_t_a_r_t_i_n_g _t_o _w_a_i_t _f_o_r _i_n_c_o_m_i_n_g _c_a_l_l_s _a_g_a_i_n.
  394.  
  395.  
  396. _M_a_n_y _m_o_d_e_m_s _h_a_v_e _a_n _a_d_a_p_t_i_v_e _d_a_t_a/_f_a_x _a_n_s_w_e_r _m_o_d_e _t_h_a_t _c_a_n _b_e _e_n_-
  397. _a_b_l_e_d  _u_s_i_n_g _t_h_e -i+FAE=1 (_f_o_r _C_l_a_s_s _1) _o_r -i+FAA=1 (_f_o_r _C_l_a_s_s _2)
  398. _i_n_i_t_i_a_l_i_z_a_t_i_o_n _s_t_r_i_n_g.  _T_h_e _t_y_p_e _o_f _c_a_l_l (_d_a_t_a _o_r _f_a_x)  _c_a_n  _t_h_e_n
  399. _b_e _d_e_d_u_c_e_d _f_r_o_m _t_h_e _m_o_d_e_m'_s _r_e_s_p_o_n_s_e_s.
  400.  
  401. _S_o_m_e _m_o_d_e_m_s _h_a_v_e _l_i_m_i_t_e_d  _a_d_a_p_t_i_v_e  _a_n_s_w_e_r  _f_e_a_t_u_r_e_s  (_e._g.  _o_n_l_y
  402. _w_o_r_k_i_n_g  _p_r_o_p_e_r_l_y  _a_t  _c_e_r_t_a_i_n  _b_a_u_d _r_a_t_e_s _o_r _o_n_l_y _i_n _C_l_a_s_s _2) _o_r
  403. _n_o_n_e  _a_t  _a_l_l.   _I_n  _t_h_i_s  _c_a_s_e  _u_s_e  _t_h_e  _i_n_i_t_i_a_l_i_z_a_t_i_o_n  _s_t_r_i_n_g
  404. -i+FCLASS=0  _t_o _a_n_s_w_e_r _i_n _d_a_t_a _m_o_d_e _f_i_r_s_t _a_n_d _t_h_e -oa _o_p_t_i_o_n _t_h_e_n
  405. _h_a_n_g _u_p _a_n_d _t_r_y _a_g_a_i_n _i_n _f_a_x _m_o_d_e _i_f _t_h_e _t_h_e _f_i_r_s_t _a_n_s_w_e_r _a_t_t_e_m_p_t
  406. _w_a_s  _n_o_t  _s_u_c_c_e_s_s_f_u_l.   _T_h_i_s  _m_e_t_h_o_d _o_n_l_y _w_o_r_k_s _i_f _y_o_u_r _t_e_l_e_p_h_o_n_e
  407. _s_y_s_t_e_m _w_a_i_t_s _a _f_e_w _s_e_c_o_n_d_s _a_f_t_e_r _y_o_u _h_a_n_g _u_p _b_e_f_o_r_e _d_i_s_c_o_n_n_e_c_t_i_n_g
  408. _i_n_c_o_m_i_n_g _c_a_l_l_s.
  409.  
  410. _I_f _t_h_e -g _o_p_t_i_o_n _i_s _u_s_e_d, _t_h_e _o_p_t_i_o_n'_s _a_r_g_u_m_e_n_t _w_i_l_l _b_e _r_u_n _a_s  _a
  411. _s_h_e_l_l  _c_o_m_m_a_n_d _w_h_e_n _a_n _i_n_c_o_m_i_n_g _d_a_t_a _c_a_l_l _i_s _d_e_t_e_c_t_e_d.  _T_y_p_i_c_a_l_l_y
  412. _t_h_i_s _c_o_m_m_a_n_d _w_i_l_l _e_x_e_c getty(_8).  _T_h_i_s _p_r_o_g_r_a_m _s_h_o_u_l_d  _e_x_p_e_c_t  _t_o
  413. _f_i_n_d  _t_h_e  _m_o_d_e_m  _a_l_r_e_a_d_y  _o_f_f-_h_o_o_k _a_n_d _a _l_o_c_k _f_i_l_e _p_r_e_s_e_n_t _s_o _i_t
  414. _s_h_o_u_l_d _n_o_t _t_r_y _t_o _h_a_n_g _u_p _t_h_e _l_i_n_e _o_r _c_r_e_a_t_e _a _l_o_c_k _f_i_l_e.
  415.  
  416. _T_h_e _f_o_l_l_o_w_i_n_g _c_o_m_m_a_n_d _w_i_l_l _m_a_k_e _e_f_a_x  _a_n_s_w_e_r  _i_n_c_o_m_i_n_g  _c_a_l_l_s  _o_n
  417. /dev/cua1  _o_n  _t_h_e _s_e_c_o_n_d _r_i_n_g.  _T_h_i_s _d_e_v_i_c_e _w_i_l_l _b_e _l_o_c_k_e_d _u_s_i_n_g
  418. _t_w_o _d_i_f_f_e_r_e_n_t _l_o_c_k _f_i_l_e_s _b_u_t _t_h_e_s_e _l_o_c_k  _f_i_l_e_s  _w_i_l_l  _b_e  _r_e_m_o_v_e_d
  419. _w_h_i_l_e _w_a_i_t_i_n_g _f_o_r _i_n_c_o_m_i_n_g _c_a_l_l_s (-s).  _I_f _a _d_a_t_a _c_a_l_l _i_s _d_e_t_e_c_t_-
  420. _e_d, _t_h_e getty _p_r_o_g_r_a_m _w_i_l_l _b_e  _r_u_n  _t_o  _i_n_i_t_i_a_l_i_z_e  _t_h_e  _t_e_r_m_i_n_a_l
  421. _d_r_i_v_e_r  _a_n_d _s_t_a_r_t _a login(_1) _p_r_o_c_e_s_s.  _R_e_c_e_i_v_e_d _f_a_x _f_i_l_e_s _w_i_l_l _b_e
  422. _s_t_o_r_e_d   _u_s_i_n_g   _n_a_m_e_s   _l_i_k_e    Dec02-12.32.33.001,    _i_n    _t_h_e
  423. /usr/spool/fax/incoming  _d_i_r_e_c_t_o_r_y  _a_n_d  _t_h_e _l_o_g _f_i_l_e _w_i_l_l _b_e _a_p_-
  424. _p_e_n_d_e_d _t_o /usr/spool/fax/faxlog.cua1.
  425.  
  426. _e_f_a_x -_d /_d_e_v/_c_u_a_1 -_o_r \
  427.    -_i '+_F_C_L_A_S_S=_2;+_F_C_R=_1;+_F_A_A=_1' \
  428.    -_x /_u_s_r/_s_p_o_o_l/_u_u_c_p/_L_C_K.._c_u_a_1 \
  429.    -_x /_u_s_r/_s_p_o_o_l/_u_u_c_p/_L_C_K.._t_t_y_S_1 \
  430.    -_g "_e_x_e_c /_s_b_i_n/_g_e_t_t_y -_h /_d_e_v/_c_u_a_1 %_d" \
  431.    -_i_S_0=_2 -_w -_s \
  432.    -_r "/_u_s_r/_s_p_o_o_l/_f_a_x/_i_n_c_o_m_i_n_g/%_b%_d-%_H.%_I.%_S" \
  433.    >> /_u_s_r/_s_p_o_o_l/_f_a_x/_f_a_x_l_o_g._c_u_a_1 _2>&_1
  434.  
  435. Note that adaptive answer of either type is unreliable.  Some fax
  436. modems  mistake  the  initial data-mode answering tones for a fax
  437. machine's answering (CED) tone.  In some cases  the  duration  of
  438. the  initial data-mode answer (set by TO_DATAF in efax.c) may not
  439. be long enough for incoming data calls to be set  up.   In  other
  440. cases it may be too long for incoming fax calls.  If you need re-
  441. liable fax reception you should use a modem or other device  that
  442. can detect incoming faxes using the fax calling (CNG) tones.
  443.  
  444.  
  445. efax can answer all incoming calls if you place an entry for efax
  446. in  /etc/inittab (for SysV-like systems) or /etc/ttytab (for BSD-
  447. like systems). The init(8) process will run a new  copy  of  efax
  448. when  the  system boots up and whenever the previous process ter-
  449. minates.  The inittab or ttytab entry should invoke efax by  run-
  450. ning the fax script with an answer argument.
  451.  
  452. For example, placing the following line in /etc/inittab will make
  453. init  run the fax script with argument answer every time previous
  454. process terminates (and init is in runlevel 4 or 5).
  455.  
  456. s1:45:respawn:/bin/sh /usr/bin/fax answer
  457.  
  458. In this case the fax script should be protected against tampering
  459. since  init  will  execute it as a privileged (root) process.  If
  460. you will also be allowing data calls  via  getty  and  login  you
  461. should  ensure  that  your system is reasonably secure (e.g. that
  462. all user id's have secure passwords).
  463.  
  464.  
  465. Double check the configuration setup in the fax script.
  466.  
  467. Run the "fax test" script and check that the modem is  responding
  468. to commands.
  469.  
  470. If efax hangs when trying to open  the  modem  device  (typically
  471. ttyX),  the  device  is  either already in use by another process
  472. (e.g. getty) or it requires the carrier detect line  to  be  true
  473. before it can be opened.  Many systems define an alternate device
  474. name for the same physical device (typically cuaX)  that  can  be
  475. opened  even  if carrier is not present or other programs are al-
  476. ready using it.
  477.  
  478. If modem responses are being lost or generated at random, another
  479. processes  (e.g.  getty)  may be trying to use the same device at
  480. the same time.  Using  lock  files  (-x  options)  can  sometimes
  481. resolve this problem.
  482.  
  483. Check the response to the "AT+FCLASS=?" command to make sure your
  484. modem supports the Class (1 or 2) that you have selected.
  485.  
  486. Attempt to send a fax. Check that the  modem  starts  making  CNG
  487. tones  (a  0.5  second tone every 3 seconds) as soon as it's fin-
  488. ished dialing.  This shows the modem is in  fax  mode.   You  may
  489. need  to  enable  the  monitor  speaker  (add  -iM2L3 to the INIT
  490. string) to monitor the phone line.
  491.  
  492. Listen to the answering fax machine and check that it sends  a  2
  493. second  beep  (CED)  followed  by DIS HDLC frames (the "warbling"
  494. signal) every 3 seconds.  If you hear a continuous signal instead
  495. (tones or noise), then you've connected to a data modem instead.
  496.  
  497. Your modem should now send back  a  DCS  frame  followed  by  1.5
  498. seconds of training check data.  If everything is OK, the receiv-
  499. ing end will send a CFR frame and your modem will start  to  send
  500. data.   If  you  have  a  modem  with a flow control (FC) LED, it
  501. should start to blink.
  502.  
  503. When the transmission completes, check the  message  showing  the
  504. line count and the average bit rate.
  505.  
  506. Low line counts (under 1000 for letter size image) or the warning
  507. "fax  output  buffer  overflow" indicate that the image format is
  508. probably incorrect. Possibly the bit order is reversed.
  509.  
  510. If the average bit rate is much higher than  the  negotiated  bit
  511. rate  (e.g. 15000 bps for a 9600bps connection) then flow control
  512. was not active.  This usually results in a garbled  transmission.
  513. The receiving machine may reject the page, abort the call or hang
  514. up.
  515.  
  516. An <XOFF> message appearing during the  transmission  means  that
  517. the  operating  system  was ignoring the modem's XON/XOFF charac-
  518. ters.  This is sometimes caused by compiling efax  with  an  out-
  519. of-date "termios.h" include file.
  520.  
  521. Most modems enable XON/XOFF flow control when  fax  mode  is  en-
  522. abled.   Check  the  output  of the fax test command for the flow
  523. control settings in fax mode (typically &K4 or Q1).  If they  are
  524. incorrect  you can use additional -i commands to enable flow con-
  525. trol after the +FCLASS= command.
  526.  
  527. Check that the remote machine confirms reception with an  +FTPS:1
  528. response (Class 2) or an MCF frame (Class 1).
  529.  
  530. The error message "abnormal call termination (code _n_n)" indicates
  531. that  the  modem detected an error (in Class 2 mode) and hung up.
  532. The modem's manual may give an explanation for the  error  number
  533. _n_n.
  534.  
  535. Many companies advertise services that will fax back  information
  536. on  their  products.   These can be useful for testing fax recep-
  537. tion.
  538.  
  539. Finally, don't play "option bingo,"  if  you  can't  resolve  the
  540. problem,  save the output of the fax test command to a file (e.g.
  541. fax test >test.out) and send it along with the log of the  failed
  542. session to the address below.
  543.  
  544. If efax should display the  message  "can't  happen  (<details>)"
  545. please send a bug report to the author.
  546.  
  547.  
  548. Efax was written by Ed Casas.  Please send comments  or  bug  re-
  549. ports to edc@ee.ubc.ca.  Please mention the operating system, the
  550. type of the modem used and include a copy of any relevant session
  551. logs.
  552.  
  553.  
  554. efax is copyright 1993, 1994 Ed Casas.  It may  be  used,  copied
  555. and modified under the terms of the GNU Public License.
  556.  
  557.  
  558. Although efax has been  tested  it  may  have  errors  that  will
  559. prevent  it from working correctly on your system.  Some of these
  560. errors may cause serious problems  including  loss  of  data  and
  561. interruptions to telephone service.
  562.  
  563.  
  564.  
  565.  
  566. Class 1 operation may fail if the program can't respond within 55
  567. milliseconds.
  568.  
  569. May fail if multitasking delays cause the received data to  over-
  570. flow  the  computer's  serial device buffer or if an under-run of
  571. transmitted data exceeds 5 seconds.
  572.  
  573. Does not handle 2-D coded images, documents with pages  of  mixed
  574. formats or procedure interrupts.
  575.  
  576. Can't read TIFF-F files.
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.